<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>


<form method="post" >
    <input type="checkbox" name="checkall" id="checkall" onclick="checkalls(this,$('select'))" checked>全选<br>
    <select multiple name="select[]" id="select" size="15" style="width:210px;height:250px">
        <option value="1" selected>顿饭大幅度</option>
        <option value="2" selected>大幅度</option>
        <option value="3" selected>大幅缩</option>
        <option value="4" selected>到司法所</option>

    </select>
    <INPUT TYPE="submit" value="提交">
</form>


<script>
    function $(id){

        return document.getElementById(id);

    }

    function checkalls(obj,form){

        var bool=(obj.checked)?true:false;
        for(var i=0;i<form.length;i++){
            form.all[i].selected=bool;
        }
    }
</script>









</body>
</html>